@echo off

copy /y Alkaline.* output\ >nul

cd output

if exist *Test* del *Test* >nul

SET CLASSPATH=C:\antlr\antlr-3.2.jar;.

echo Compiling...

java org.antlr.Tool Alkaline.g
javac *.java

echo Done. Running unit tests...
echo.

cd ..

for /R tests %%T in (*.gunit) do (
	copy /y %%T output\%%~nxT >nul

	cd output
	echo.
	echo Running test %%~nT

	java org.antlr.gunit.Interp %%~nxT

	echo.
	cd ..
)


echo.
pause
